package com.chenxi.vhr.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.chenxi.vhr.bean.VhrEmployee;
import com.chenxi.vhr.bean.common.Result;
import com.chenxi.vhr.bean.common.ResultPageInfo;
import com.chenxi.vhr.bean.vo.EmployeeVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 *
 */
public interface VhrEmployeeService extends IService<VhrEmployee> {

    /**
     * 分页查询
     * @param currentPage
     * @param size
     * @param employee
     * @return
     */
    ResultPageInfo listPage(Integer currentPage, Integer size, EmployeeVo employee);

    /**
     * 生成最新可用的工号
     * @return
     */
    Result genWorkNo();


    /**
     * 解析上传文件
     * @param file
     * @param fieldList   前端传递的属性List
     * @return
     */
    Result importExcel(MultipartFile file, List<String> fieldList) throws Exception;

    /**
     * 添加员工
     * @param employee
     * @return
     */
    Result saveEmployee(VhrEmployee employee);

    /**
     * 修改员工
     * @param employee
     * @return
     */
    Result updateEmployee(VhrEmployee employee);

    /**
     * 查询员工信息 和薪水信息
     * @param page
     * @param size
     * @return
     */
    ResultPageInfo listEmpWithSalary(Integer page, Integer size);

    /**
     * 修改员工薪资账套
     * @param empId
     * @param salaryId
     * @return
     */
    Result updateEmpSalary(Integer empId, Integer salaryId);
}
